package com.byedu.entity;

import java.io.Serializable;

/**
 * 课程
 * Created by Luo on 2017-04-25
 */
public class Course implements Serializable {
    private static final long serialVersionUID = -4915798083536968387L;

    /*课程编号*/
    private Integer id;
    /*所属行业*/
    private String industry;
    /*课程名*/
    private String name;
    /*课程简介*/
    private String intro;
    /*封面图*/
    private String img;
    /*售价*/
    private int price;
    /*开放时间*/
    private String openTime;

    private boolean pay;

    public Course() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIndustry() {
        return industry;
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getOpenTime() {
        return openTime;
    }

    public void setOpenTime(String openTime) {
        this.openTime = openTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Course course = (Course) o;

        if (id != null ? !id.equals(course.id) : course.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }


    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Override
    public String toString() {
        return "Course{" +
         "id=" + id +
         ", industry='" + industry + '\'' +
         ", name='" + name + '\'' +
         ", intro='" + intro + '\'' +
         ", img='" + img + '\'' +
         ", price=" + price +
         ", openTime='" + openTime + '\'' +
         '}';
    }

    public boolean isPay() {
        return pay;
    }

    public void setPay(boolean pay) {
        this.pay = pay;
    }
}
